package com.springcloud.demo.test.kettle;

import org.pentaho.di.core.KettleEnvironment;
import org.pentaho.di.core.util.EnvUtil;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.ContextRefreshedEvent;

;

/**
 * @author zhouyang
 * @Description
 * @date 2018/08/23
 */
@Configuration
public class InitKettleEnvironment implements ApplicationListener<ContextRefreshedEvent> {

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        try {
            KettleEnvironment.init();
            EnvUtil.environmentInit();
        }catch (Exception e){

        }
    }

}
